<script>
	import Vue from "vue";
	export default {
		onLaunch: function() {
			// console.log("App Launch");
			uni.getSystemInfo({		
				success: function(e) {
					// #ifndef MP
					Vue.prototype.StatusBar = e.statusBarHeight;
					if (e.platform == "android") {
						Vue.prototype.CustomBar = e.statusBarHeight + 50;
					} else {
						Vue.prototype.CustomBar = e.statusBarHeight + 45;
					}
					// #endif

					// #ifdef MP-WEIXIN
					// console.log(e)
					Vue.prototype.StatusBar = e.statusBarHeight;
					let custom = wx.getMenuButtonBoundingClientRect();
					console.log(custom)
					// console.log(custom.bottom + custom.top + e.statusBarHeight)
					Vue.prototype.Custom = custom;
					Vue.prototype.CustomBar =
						custom.bottom + custom.top - e.statusBarHeight;
					// #endif
				},
			});
			 // //#ifdef APP-PLUS  
			 //    var server = "https://www.example.com/update"; //检查更新地址  
			 //    var req = { //升级检测数据  
			 //        "appid": plus.runtime.appid,  
			 //        "version": plus.runtime.version  
			 //    };  
			 //    uni.request({  
			 //        url: server,  
			 //        data: req,  
			 //        success: (res) =&gt; {  
			 //            if (res.statusCode == 200 &amp;&amp; res.data.status === 1) {  
			 //                uni.showModal({ //提醒用户更新  
			 //                    title: "更新提示",  
			 //                    content: res.data.note,  
			 //                    success: (res) =&gt; {  
			 //                        if (res.confirm) {  
			 //                            plus.runtime.openURL(res.data.url);  
			 //                        }  
			 //                    }  
			 //                })  
			 //            }  
			 //        }  
			 //    })  
			 //    //#endif  
		},
		onShow: function() {
			uni.setStorageSync('isBack', false)
			// #ifdef MP-WEIXIN
			uni.hideTabBar()
			// #endif
			
			// console.log('App Show')
		},
		onHide: function() {
			// console.log('App Hide')
		},
	};
</script>

<style>
	/*每个页面公共css */

	/*  #ifndef  APP-NVUE */
	@import "common/css/main.css";
	@import "common/css/icon.css";
	@import "common/css/common.css";
	/*  #endif  */
</style>
